<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--<input type="button"  value="提交" onclick="alert('牛逼了')">-->
</body>
<script>
  //午参无返回值
  function f1(){
    alert("进行点击");
    console.log("牛逼");
  }
      f1();
  //有参无返回值
  function f2(name,age)
  {
    console.log(name+':'+age);
  }
    f2("扭蛋",16);
  //有参有返回值
  function f3(name,age){
    return name+":"+age;
  }
  let re = f3('刘备',17);
  console.log(re);
  // 无参有返回值
  function f4(){
    return "篮网可惜了！"
  }
   console.log(f4());
  //新的方式
   let f5 = function (name,age){
     return name+':'+age;
   }
   console.log(f5("杜兰特",33));
   let f6 = new Function("name","age","console.log(name+';'+age)");
   f6("欧文",111);
</script>
</html>